#ifndef _ARR_QUEUE_H
#define _ARR_QUEUE_H

typedef int ElementType;

typedef struct ArrQueueNode
{
    ElementType element;
} ArrQueueNode;

typedef struct Arr_Queue
{
    int size;
    int curLength;
    int headIndex;
    int tailIndex;
    ArrQueueNode* basicArr; //循环数组表示的队列
} Arr_Queue;

extern Arr_Queue *InitQueue(int size);

extern void Enqueue(Arr_Queue *queue, ElementType element);

extern ElementType Dequeue(Arr_Queue *queue);

extern ElementType Peek(Arr_Queue *queue);

extern void ShowQueue(Arr_Queue *queue);

extern void Clear(Arr_Queue *queue);

#endif